\hypertarget{class_q_c_p_item_pixmap}{}\section{Q\+C\+P\+Item\+Pixmap Class Reference}
\label{class_q_c_p_item_pixmap}\index{Q\+C\+P\+Item\+Pixmap@{Q\+C\+P\+Item\+Pixmap}}


An arbitrary pixmap.  


Inheritance diagram for Q\+C\+P\+Item\+Pixmap\+:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=4.000000cm]{class_q_c_p_item_pixmap}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{class_q_c_p_item_pixmap_aa6de42a37261b21a5480e7da122345c3}{Q\+C\+P\+Item\+Pixmap}} (\mbox{\hyperlink{class_q_custom_plot}{Q\+Custom\+Plot}} $\ast$parent\+Plot)
\item 
\mbox{\Hypertarget{class_q_c_p_item_pixmap_a7daef7e0c432902d69e7db3e0e217a1f}\label{class_q_c_p_item_pixmap_a7daef7e0c432902d69e7db3e0e217a1f}} 
Q\+Pixmap {\bfseries pixmap} () const
\item 
\mbox{\Hypertarget{class_q_c_p_item_pixmap_a8768534b5f3080abfc007db198373327}\label{class_q_c_p_item_pixmap_a8768534b5f3080abfc007db198373327}} 
bool {\bfseries scaled} () const
\item 
\mbox{\Hypertarget{class_q_c_p_item_pixmap_a662cbca12e6cdcd2a94b0b08879292fd}\label{class_q_c_p_item_pixmap_a662cbca12e6cdcd2a94b0b08879292fd}} 
Qt\+::\+Aspect\+Ratio\+Mode {\bfseries aspect\+Ratio\+Mode} () const
\item 
\mbox{\Hypertarget{class_q_c_p_item_pixmap_ab963aa9693d49c323948f2820a5785b6}\label{class_q_c_p_item_pixmap_ab963aa9693d49c323948f2820a5785b6}} 
Qt\+::\+Transformation\+Mode {\bfseries transformation\+Mode} () const
\item 
\mbox{\Hypertarget{class_q_c_p_item_pixmap_a6ae9922eba6386a5ac4e2a569ec29e1f}\label{class_q_c_p_item_pixmap_a6ae9922eba6386a5ac4e2a569ec29e1f}} 
Q\+Pen {\bfseries pen} () const
\item 
\mbox{\Hypertarget{class_q_c_p_item_pixmap_a23806a20efcb172f0309e18809dc49d8}\label{class_q_c_p_item_pixmap_a23806a20efcb172f0309e18809dc49d8}} 
Q\+Pen {\bfseries selected\+Pen} () const
\item 
void \mbox{\hyperlink{class_q_c_p_item_pixmap_a726b69ea4025edf48f9b29b6450548a7}{set\+Pixmap}} (const Q\+Pixmap \&pixmap)
\item 
void \mbox{\hyperlink{class_q_c_p_item_pixmap_ab4d44529a1c6c8d37d0ea7560e042777}{set\+Scaled}} (bool scaled, Qt\+::\+Aspect\+Ratio\+Mode aspect\+Ratio\+Mode=Qt\+::\+Keep\+Aspect\+Ratio, Qt\+::\+Transformation\+Mode transformation\+Mode=Qt\+::\+Smooth\+Transformation)
\item 
void \mbox{\hyperlink{class_q_c_p_item_pixmap_acdade1305edb4b5cae14f97fd132065f}{set\+Pen}} (const Q\+Pen \&pen)
\item 
void \mbox{\hyperlink{class_q_c_p_item_pixmap_afc5e479e88e53740176ce77cb70dd67a}{set\+Selected\+Pen}} (const Q\+Pen \&pen)
\item 
virtual double \mbox{\hyperlink{class_q_c_p_item_pixmap_a7583a98ebd3f35d2ac5d6c05fad25a6c}{select\+Test}} (const Q\+PointF \&pos, bool only\+Selectable, Q\+Variant $\ast$details=0) const
\end{DoxyCompactItemize}
\subsection*{Public Attributes}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{class_q_c_p_item_pixmap_a43c281ef6ad46f3cf04f365289abe51a}\label{class_q_c_p_item_pixmap_a43c281ef6ad46f3cf04f365289abe51a}} 
\mbox{\hyperlink{class_q_c_p_item_position}{Q\+C\+P\+Item\+Position}} $\ast$const {\bfseries top\+Left}
\item 
\mbox{\Hypertarget{class_q_c_p_item_pixmap_abcc38063f9502b876bf6615c45cc0994}\label{class_q_c_p_item_pixmap_abcc38063f9502b876bf6615c45cc0994}} 
\mbox{\hyperlink{class_q_c_p_item_position}{Q\+C\+P\+Item\+Position}} $\ast$const {\bfseries bottom\+Right}
\item 
\mbox{\Hypertarget{class_q_c_p_item_pixmap_af7a156590b1d59ab21b453c430c56a7c}\label{class_q_c_p_item_pixmap_af7a156590b1d59ab21b453c430c56a7c}} 
\mbox{\hyperlink{class_q_c_p_item_anchor}{Q\+C\+P\+Item\+Anchor}} $\ast$const {\bfseries top}
\item 
\mbox{\Hypertarget{class_q_c_p_item_pixmap_a72eabd0010be41a4ec1b22aa983d2aa1}\label{class_q_c_p_item_pixmap_a72eabd0010be41a4ec1b22aa983d2aa1}} 
\mbox{\hyperlink{class_q_c_p_item_anchor}{Q\+C\+P\+Item\+Anchor}} $\ast$const {\bfseries top\+Right}
\item 
\mbox{\Hypertarget{class_q_c_p_item_pixmap_ac9c0fd231f9e285765978a05d13f8280}\label{class_q_c_p_item_pixmap_ac9c0fd231f9e285765978a05d13f8280}} 
\mbox{\hyperlink{class_q_c_p_item_anchor}{Q\+C\+P\+Item\+Anchor}} $\ast$const {\bfseries right}
\item 
\mbox{\Hypertarget{class_q_c_p_item_pixmap_ad7da77f530868e846151eff8a28fb948}\label{class_q_c_p_item_pixmap_ad7da77f530868e846151eff8a28fb948}} 
\mbox{\hyperlink{class_q_c_p_item_anchor}{Q\+C\+P\+Item\+Anchor}} $\ast$const {\bfseries bottom}
\item 
\mbox{\Hypertarget{class_q_c_p_item_pixmap_a01943e569233382b3627e24636b0fff2}\label{class_q_c_p_item_pixmap_a01943e569233382b3627e24636b0fff2}} 
\mbox{\hyperlink{class_q_c_p_item_anchor}{Q\+C\+P\+Item\+Anchor}} $\ast$const {\bfseries bottom\+Left}
\item 
\mbox{\Hypertarget{class_q_c_p_item_pixmap_a8c85fcb8cb8ce292859a0499d16539b1}\label{class_q_c_p_item_pixmap_a8c85fcb8cb8ce292859a0499d16539b1}} 
\mbox{\hyperlink{class_q_c_p_item_anchor}{Q\+C\+P\+Item\+Anchor}} $\ast$const {\bfseries left}
\end{DoxyCompactItemize}
\subsection*{Protected Types}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{class_q_c_p_item_pixmap_a0ea7f65edb7395e02de521915f221174}\label{class_q_c_p_item_pixmap_a0ea7f65edb7395e02de521915f221174}} 
enum {\bfseries Anchor\+Index} \{ \newline
{\bfseries ai\+Top}, 
{\bfseries ai\+Top\+Right}, 
{\bfseries ai\+Right}, 
{\bfseries ai\+Bottom}, 
\newline
{\bfseries ai\+Bottom\+Left}, 
{\bfseries ai\+Left}
 \}
\end{DoxyCompactItemize}
\subsection*{Protected Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{class_q_c_p_item_pixmap_a879e8076c2db01a38b34cfa73ec95d2f}\label{class_q_c_p_item_pixmap_a879e8076c2db01a38b34cfa73ec95d2f}} 
virtual void {\bfseries draw} (\mbox{\hyperlink{class_q_c_p_painter}{Q\+C\+P\+Painter}} $\ast$painter)
\item 
\mbox{\Hypertarget{class_q_c_p_item_pixmap_a24d4072c0e50c608ddcc0840d853fc03}\label{class_q_c_p_item_pixmap_a24d4072c0e50c608ddcc0840d853fc03}} 
virtual Q\+PointF {\bfseries anchor\+Pixel\+Point} (int anchor\+Id) const
\item 
\mbox{\Hypertarget{class_q_c_p_item_pixmap_a8bced3027b326b290726cd1979c7cfc6}\label{class_q_c_p_item_pixmap_a8bced3027b326b290726cd1979c7cfc6}} 
void {\bfseries update\+Scaled\+Pixmap} (Q\+Rect final\+Rect=Q\+Rect(), bool flip\+Horz=false, bool flip\+Vert=false)
\item 
\mbox{\Hypertarget{class_q_c_p_item_pixmap_a4e7d803e5093c457a109f8fae56677c2}\label{class_q_c_p_item_pixmap_a4e7d803e5093c457a109f8fae56677c2}} 
Q\+Rect {\bfseries get\+Final\+Rect} (bool $\ast$flipped\+Horz=0, bool $\ast$flipped\+Vert=0) const
\item 
\mbox{\Hypertarget{class_q_c_p_item_pixmap_aad6dddd67163831538d40023a98a9fe7}\label{class_q_c_p_item_pixmap_aad6dddd67163831538d40023a98a9fe7}} 
Q\+Pen {\bfseries main\+Pen} () const
\end{DoxyCompactItemize}
\subsection*{Protected Attributes}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{class_q_c_p_item_pixmap_a1396cce7f26c7b8e9512906284380c4d}\label{class_q_c_p_item_pixmap_a1396cce7f26c7b8e9512906284380c4d}} 
Q\+Pixmap {\bfseries m\+Pixmap}
\item 
\mbox{\Hypertarget{class_q_c_p_item_pixmap_a2ebc66e15b9f1264563d58f29ba1bc00}\label{class_q_c_p_item_pixmap_a2ebc66e15b9f1264563d58f29ba1bc00}} 
Q\+Pixmap {\bfseries m\+Scaled\+Pixmap}
\item 
\mbox{\Hypertarget{class_q_c_p_item_pixmap_a8fe670a529cd46a9b8afd9fc1203bc3f}\label{class_q_c_p_item_pixmap_a8fe670a529cd46a9b8afd9fc1203bc3f}} 
bool {\bfseries m\+Scaled}
\item 
\mbox{\Hypertarget{class_q_c_p_item_pixmap_a8dc6b6c1e106ac523efae22d5fe55bab}\label{class_q_c_p_item_pixmap_a8dc6b6c1e106ac523efae22d5fe55bab}} 
Qt\+::\+Aspect\+Ratio\+Mode {\bfseries m\+Aspect\+Ratio\+Mode}
\item 
\mbox{\Hypertarget{class_q_c_p_item_pixmap_ac9ecad3b9842363754e32eda2cf821bd}\label{class_q_c_p_item_pixmap_ac9ecad3b9842363754e32eda2cf821bd}} 
Qt\+::\+Transformation\+Mode {\bfseries m\+Transformation\+Mode}
\item 
\mbox{\Hypertarget{class_q_c_p_item_pixmap_acfee1124eb51a1887aaf8de10777c7a1}\label{class_q_c_p_item_pixmap_acfee1124eb51a1887aaf8de10777c7a1}} 
Q\+Pen {\bfseries m\+Pen}
\item 
\mbox{\Hypertarget{class_q_c_p_item_pixmap_a0949e5bb6a261fc4e9668e28e2effcfa}\label{class_q_c_p_item_pixmap_a0949e5bb6a261fc4e9668e28e2effcfa}} 
Q\+Pen {\bfseries m\+Selected\+Pen}
\end{DoxyCompactItemize}
\subsection*{Additional Inherited Members}


\subsection{Detailed Description}
An arbitrary pixmap. 

 It has two positions, {\itshape top\+Left} and {\itshape bottom\+Right}, which define the rectangle the pixmap will be drawn in. Depending on the scale setting (\mbox{\hyperlink{class_q_c_p_item_pixmap_ab4d44529a1c6c8d37d0ea7560e042777}{set\+Scaled}}), the pixmap will be either scaled to fit the rectangle or be drawn aligned to the top\+Left position.

If scaling is enabled and {\itshape top\+Left} is further to the bottom/right than {\itshape bottom\+Right} (as shown on the right side of the example image), the pixmap will be flipped in the respective orientations. 

\subsection{Constructor \& Destructor Documentation}
\mbox{\Hypertarget{class_q_c_p_item_pixmap_aa6de42a37261b21a5480e7da122345c3}\label{class_q_c_p_item_pixmap_aa6de42a37261b21a5480e7da122345c3}} 
\index{Q\+C\+P\+Item\+Pixmap@{Q\+C\+P\+Item\+Pixmap}!Q\+C\+P\+Item\+Pixmap@{Q\+C\+P\+Item\+Pixmap}}
\index{Q\+C\+P\+Item\+Pixmap@{Q\+C\+P\+Item\+Pixmap}!Q\+C\+P\+Item\+Pixmap@{Q\+C\+P\+Item\+Pixmap}}
\subsubsection{\texorpdfstring{Q\+C\+P\+Item\+Pixmap()}{QCPItemPixmap()}}
{\footnotesize\ttfamily Q\+C\+P\+Item\+Pixmap\+::\+Q\+C\+P\+Item\+Pixmap (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{class_q_custom_plot}{Q\+Custom\+Plot}} $\ast$}]{parent\+Plot }\end{DoxyParamCaption})}

Creates a rectangle item and sets default values.

The constructed item can be added to the plot with \mbox{\hyperlink{class_q_custom_plot_aa500620379262321685cb7a7674cbd2a}{Q\+Custom\+Plot\+::add\+Item}}. 

\subsection{Member Function Documentation}
\mbox{\Hypertarget{class_q_c_p_item_pixmap_a7583a98ebd3f35d2ac5d6c05fad25a6c}\label{class_q_c_p_item_pixmap_a7583a98ebd3f35d2ac5d6c05fad25a6c}} 
\index{Q\+C\+P\+Item\+Pixmap@{Q\+C\+P\+Item\+Pixmap}!select\+Test@{select\+Test}}
\index{select\+Test@{select\+Test}!Q\+C\+P\+Item\+Pixmap@{Q\+C\+P\+Item\+Pixmap}}
\subsubsection{\texorpdfstring{select\+Test()}{selectTest()}}
{\footnotesize\ttfamily double Q\+C\+P\+Item\+Pixmap\+::select\+Test (\begin{DoxyParamCaption}\item[{const Q\+PointF \&}]{pos,  }\item[{bool}]{only\+Selectable,  }\item[{Q\+Variant $\ast$}]{details = {\ttfamily 0} }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [virtual]}}

This function is used to decide whether a click hits a layerable object or not.

{\itshape pos} is a point in pixel coordinates on the \mbox{\hyperlink{class_q_custom_plot}{Q\+Custom\+Plot}} surface. This function returns the shortest pixel distance of this point to the object. If the object is either invisible or the distance couldn\textquotesingle{}t be determined, -\/1.\+0 is returned. Further, if {\itshape only\+Selectable} is true and the object is not selectable, -\/1.\+0 is returned, too.

If the object is represented not by single lines but by an area like a \mbox{\hyperlink{class_q_c_p_item_text}{Q\+C\+P\+Item\+Text}} or the bars of a \mbox{\hyperlink{class_q_c_p_bars}{Q\+C\+P\+Bars}} plottable, a click inside the area should also be considered a hit. In these cases this function thus returns a constant value greater zero but still below the parent plot\textquotesingle{}s selection tolerance. (typically the selection\+Tolerance multiplied by 0.\+99).

Providing a constant value for area objects allows selecting line objects even when they are obscured by such area objects, by clicking close to the lines (i.\+e. closer than 0.\+99$\ast$selection\+Tolerance).

The actual setting of the selection state is not done by this function. This is handled by the parent \mbox{\hyperlink{class_q_custom_plot}{Q\+Custom\+Plot}} when the mouse\+Release\+Event occurs, and the finally selected object is notified via the select\+Event/deselect\+Event methods.

{\itshape details} is an optional output parameter. Every layerable subclass may place any information in {\itshape details}. This information will be passed to select\+Event when the parent \mbox{\hyperlink{class_q_custom_plot}{Q\+Custom\+Plot}} decides on the basis of this select\+Test call, that the object was successfully selected. The subsequent call to select\+Event will carry the {\itshape details}. This is useful for multi-\/part objects (like \mbox{\hyperlink{class_q_c_p_axis}{Q\+C\+P\+Axis}}). This way, a possibly complex calculation to decide which part was clicked is only done once in \mbox{\hyperlink{class_q_c_p_item_pixmap_a7583a98ebd3f35d2ac5d6c05fad25a6c}{select\+Test}}. The result (i.\+e. the actually clicked part) can then be placed in {\itshape details}. So in the subsequent select\+Event, the decision which part was selected doesn\textquotesingle{}t have to be done a second time for a single selection operation.

You may pass 0 as {\itshape details} to indicate that you are not interested in those selection details.

\begin{DoxySeeAlso}{See also}
select\+Event, deselect\+Event, \mbox{\hyperlink{class_q_custom_plot_a5ee1e2f6ae27419deca53e75907c27e5}{Q\+Custom\+Plot\+::set\+Interactions}} 
\end{DoxySeeAlso}


Implements \mbox{\hyperlink{class_q_c_p_abstract_item_a96d522d10ffc0413b9a366c6f7f0476b}{Q\+C\+P\+Abstract\+Item}}.

\mbox{\Hypertarget{class_q_c_p_item_pixmap_acdade1305edb4b5cae14f97fd132065f}\label{class_q_c_p_item_pixmap_acdade1305edb4b5cae14f97fd132065f}} 
\index{Q\+C\+P\+Item\+Pixmap@{Q\+C\+P\+Item\+Pixmap}!set\+Pen@{set\+Pen}}
\index{set\+Pen@{set\+Pen}!Q\+C\+P\+Item\+Pixmap@{Q\+C\+P\+Item\+Pixmap}}
\subsubsection{\texorpdfstring{set\+Pen()}{setPen()}}
{\footnotesize\ttfamily void Q\+C\+P\+Item\+Pixmap\+::set\+Pen (\begin{DoxyParamCaption}\item[{const Q\+Pen \&}]{pen }\end{DoxyParamCaption})}

Sets the pen that will be used to draw a border around the pixmap.

\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{class_q_c_p_item_pixmap_afc5e479e88e53740176ce77cb70dd67a}{set\+Selected\+Pen}}, set\+Brush 
\end{DoxySeeAlso}
\mbox{\Hypertarget{class_q_c_p_item_pixmap_a726b69ea4025edf48f9b29b6450548a7}\label{class_q_c_p_item_pixmap_a726b69ea4025edf48f9b29b6450548a7}} 
\index{Q\+C\+P\+Item\+Pixmap@{Q\+C\+P\+Item\+Pixmap}!set\+Pixmap@{set\+Pixmap}}
\index{set\+Pixmap@{set\+Pixmap}!Q\+C\+P\+Item\+Pixmap@{Q\+C\+P\+Item\+Pixmap}}
\subsubsection{\texorpdfstring{set\+Pixmap()}{setPixmap()}}
{\footnotesize\ttfamily void Q\+C\+P\+Item\+Pixmap\+::set\+Pixmap (\begin{DoxyParamCaption}\item[{const Q\+Pixmap \&}]{pixmap }\end{DoxyParamCaption})}

Sets the pixmap that will be displayed. \mbox{\Hypertarget{class_q_c_p_item_pixmap_ab4d44529a1c6c8d37d0ea7560e042777}\label{class_q_c_p_item_pixmap_ab4d44529a1c6c8d37d0ea7560e042777}} 
\index{Q\+C\+P\+Item\+Pixmap@{Q\+C\+P\+Item\+Pixmap}!set\+Scaled@{set\+Scaled}}
\index{set\+Scaled@{set\+Scaled}!Q\+C\+P\+Item\+Pixmap@{Q\+C\+P\+Item\+Pixmap}}
\subsubsection{\texorpdfstring{set\+Scaled()}{setScaled()}}
{\footnotesize\ttfamily void Q\+C\+P\+Item\+Pixmap\+::set\+Scaled (\begin{DoxyParamCaption}\item[{bool}]{scaled,  }\item[{Qt\+::\+Aspect\+Ratio\+Mode}]{aspect\+Ratio\+Mode = {\ttfamily Qt\+:\+:KeepAspectRatio},  }\item[{Qt\+::\+Transformation\+Mode}]{transformation\+Mode = {\ttfamily Qt\+:\+:SmoothTransformation} }\end{DoxyParamCaption})}

Sets whether the pixmap will be scaled to fit the rectangle defined by the {\itshape top\+Left} and {\itshape bottom\+Right} positions. \mbox{\Hypertarget{class_q_c_p_item_pixmap_afc5e479e88e53740176ce77cb70dd67a}\label{class_q_c_p_item_pixmap_afc5e479e88e53740176ce77cb70dd67a}} 
\index{Q\+C\+P\+Item\+Pixmap@{Q\+C\+P\+Item\+Pixmap}!set\+Selected\+Pen@{set\+Selected\+Pen}}
\index{set\+Selected\+Pen@{set\+Selected\+Pen}!Q\+C\+P\+Item\+Pixmap@{Q\+C\+P\+Item\+Pixmap}}
\subsubsection{\texorpdfstring{set\+Selected\+Pen()}{setSelectedPen()}}
{\footnotesize\ttfamily void Q\+C\+P\+Item\+Pixmap\+::set\+Selected\+Pen (\begin{DoxyParamCaption}\item[{const Q\+Pen \&}]{pen }\end{DoxyParamCaption})}

Sets the pen that will be used to draw a border around the pixmap when selected

\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{class_q_c_p_item_pixmap_acdade1305edb4b5cae14f97fd132065f}{set\+Pen}}, \mbox{\hyperlink{class_q_c_p_abstract_item_a203de94ad586cc44d16c9565f49d3378}{set\+Selected}} 
\end{DoxySeeAlso}


The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize}
\item 
R\+:/\+Develop/a0-\/develop/\+Lib\+Q\+Qt/src/charts/qcustomplot/\mbox{\hyperlink{qcustomplot_8h}{qcustomplot.\+h}}\item 
R\+:/\+Develop/a0-\/develop/\+Lib\+Q\+Qt/src/charts/qcustomplot/\mbox{\hyperlink{qcustomplot_8cpp}{qcustomplot.\+cpp}}\end{DoxyCompactItemize}
